package com.demo.gulimall.order.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("mq_message")
public class MqMessage implements Serializable {
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@TableField(value = "`message_id`")
	private String messageId;

	@TableField(value = "`content`")
	private String content;

	@TableField(value = "`to_exchane`")
	private String toExchane;

	@TableField(value = "`routing_key`")
	private String routingKey;

	@TableField(value = "`class_type`")
	private String classType;

	/** 0-新建 1-已发送 2-错误抵达 3-已抵达 */
	@TableField(value = "`message_status`")
	private Integer messageStatus;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`update_time`")
	private Date updateTime;

}
